#include "FloydAlgSeq.h"

void floydSequential( int n, int* d )
{
	for (int k=0; k<n; k++)
		for (int i=0; i<n; i++)
			for (int j=0; j<n; j++)
				if (d[i*n+k]>=0 && d[k*n+j]>=0)
					if ((d[i*n+j] > (d[i*n+k] + d[k*n+j])) || ( d[i*n+j]<0) )
						d[i*n+j] =  d[i*n+k] + d[k*n+j]; 				

}

